package cloud.demo.eureka.service.impl;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Service;

import cloud.demo.eureka.model.Product;
import cloud.demo.eureka.service.ProductService;

@Service
public class ProductServiceImpl implements ProductService {

	@Override
	public List<Product> all() {
		List<Product> list = new ArrayList<>();

		Product p = new Product();
		p.setId(17);
		p.setName("Apple iPhone 8 (A1863) 64GB");
		p.setPlace("USA");
		p.setPrice(new BigDecimal("5999"));
		list.add(p);

		p = new Product();
		p.setId(43);
		p.setName("荣耀 V10 高配版");
		p.setPlace("China");
		p.setPrice(new BigDecimal("2999"));
		list.add(p);

		p = new Product();
		p.setId(279);
		p.setName("vivo X20 王者荣耀限量版");
		p.setPlace("China");
		p.setPrice(new BigDecimal("3498"));
		list.add(p);

		return list;
	}

}
